package com.zhiyou100.util;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.JSONPObject;
import com.zhiyou100.model.Course;
import org.junit.Test;
import org.springframework.web.bind.annotation.RequestBody;
import redis.clients.jedis.Jedis;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class UtilS {

    public static String getCalt() {
        String ramdomStr = "qwertyuiopasdfghjklzxcvbnm123456789";
        String[] split = ramdomStr.split("");
        System.out.println(Arrays.toString(split));
        String ret = "";
        for (int i = 0; i < Math.random() * 5 + 5; i++) {
            int ramdom = (int) (Math.random() * split.length);
            ret += split[ramdom];
        }
        return ret;
    }
    public static String getTeml() {
        String ramdomStr = "1234567890";
        String[] split = ramdomStr.split("");
        System.out.println(Arrays.toString(split));
        String ret = "";
        for (int i = 0; i < 6; i++) {
            int ramdom = (int) (Math.random() * split.length);
            ret += split[ramdom];
        }
        return ret;
    }
    public static void main(String[] args) {

        System.out.println(getTeml());
    }
}